import React, { Component } from 'react'
import Father from './Father'
import { Provider } from '../utils/context'

// 嵌套传值
// Consumer 消费
// Provider 提供

class Com extends Component {
    state = {
        count: 8888
    }
    render() {
        return (
            <div>
                <h3>我是最外层的组件 --- { this.state.count }</h3>
                <Provider value = { this.state.count }>
                    <Father/>
                </Provider>
            </div>
        )
    }
}

export default Com
